<template>
	<view>
		<!-- 返回頂部  -->
		<view class="ScrollTop" v-if="value" @click="tapscroll">
		</view>
	</view>
</template>

<script>
	export default {
		name: "ScrollTop",
		props: ["value","ScrollTopTime"],
		methods: {
			tapscroll() {
				uni.pageScrollTo({
					scrollTop: 0,
					duration: this.ScrollTopTime
				})
			}
		}
	}
</script>

<style lang="scss">
	.ScrollTop {
		height: 80rpx;
		width: 80rpx;
		position: fixed;
		bottom: 140rpx;
		right: 45rpx;
		z-index: 1000;
		background: white;
		border-radius: 80rpx;
		background-image: url("@/static/sroTop.png");
		background-size: 100% 100%;
	}
</style>
